#include <bits/stdc++.h>
using namespace std;
int main()
{
    string s = "abcxyzabcxyzabxyz";
    cout << s.find_last_of("abc");
    cout << endl;
    cout << s.rfind("abc");
    return 0;
}